package com.liuyonggang.generator.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liuyonggang.generator.dao.impl.DbInfoDal;
import com.liuyonggang.generator.model.DbInfo;
import com.liuyonggang.generator.service.DbInfoApi;
import com.liuyonggang.generator.util.PageInfo;
import com.liuyonggang.generator.util.ResultVo;

@Service("dbInfoApi")
public class DbInfoService implements DbInfoApi {

	@Autowired
	private DbInfoDal dbInfoDal;
	
	@Override
	public int countModel() {
		return dbInfoDal.countModel();
	}

	@Override
	public List<DbInfo> findAll(DbInfo task) {
		return dbInfoDal.findAll(task);
	}

    @Override
    public PageInfo<DbInfo> findAllByPage(PageInfo<DbInfo> pageInfo) {
        return dbInfoDal.findAllByPage(pageInfo);
    }

    @Override
    public ResultVo addDbInfo(DbInfo db) {
        return dbInfoDal.addDbInfo(db);
    }

    @Override
    public DbInfo findById(int id) {
        return dbInfoDal.findById(id);
    }

    @Override
    public ResultVo updateDbInfo(DbInfo db) {
        return dbInfoDal.updateDbInfo(db);
    }

    @Override
    public ResultVo deleteDbInfo(DbInfo db) {
        return dbInfoDal.deleteDbInfo(db);
    }

   

}
